import { Body, Controller, Post, UseGuards } from '@nestjs/common';
import { ReportService } from './report.service';
import { QueryReportRecordDto } from './dto/query-report-record.dto';
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
import { AuthGuard } from '@nestjs/passport';

@Controller('report')
@ApiTags('报表')
@UseGuards(AuthGuard('jwt'))
@ApiBearerAuth()
export class ReportController {
  constructor(private readonly reportService: ReportService) {}

  @Post('record')
  getRecord(@Body() query: QueryReportRecordDto) {
    return this.reportService.getRecord(query);
  }
}
